package com.example.springtest.factory;

import com.common.myspring.annotation.Resource;
import com.example.springtest.aspect.CarAspect;
import com.example.springtest.service.Car;
import com.example.springtest.service.impl.BenzCar;
import org.springframework.aop.framework.ProxyFactoryBean;

/**
 * @title: CarFactoryBean
 * @Author xu-xiang
 * @Date: 2023/8/29 11:41
 * @description:
 */
//@Configuration
public class CarFactoryBean2 extends ProxyFactoryBean {

    @Resource
    private CarAspect carAspect;

    public CarFactoryBean2() {
        setInterfaces(Car.class);
        setTarget(new BenzCar());
        setInterceptorNames("carAspect");
    }
}
